import request from '@/utils/request'
import qs from 'qs'

export function getListPage(params) {
  return request({
    url: '/operate/floor/listFloor',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'pageNum': params.pageNum,
      'pageSize': params.pageSize
    },
    method: 'get',
    params: params
  })
}
// 获取岗位list
export function getPubList(params) {
  return request({
    url: '/ejob/jobOffers/pub/listPage',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'pageNum': params.pageNum,
      'pageSize': params.pageSize
    },
    method: 'get',
    params: params
  })
}

// 获取教育课程
export function getEduCoursesList(params) {
  return request({
    url: '/edu/eduCourses/listPage',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
      'pageNum': params.pageNum,
      'pageSize': params.pageSize
    },
    method: 'get',
    params: params
  })
}
export function getEnterprise() {
  return request({
    url: '/ejob/jobCompany/list',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'get',
  })
}
export function getProfession() {
  return request({
    url: '/ejob/jobCategory/list',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'get',
  })
}

export function updateFloor(data) {
  return request({
    url: '/operate/floor/updateFloor',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}
export function updateStatus(params) {
  return request({
    url: '/operate/floor/deleteFloor?floorId=' + params.id + '&status=' + params.status,
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'get',
    //   data: qs.stringify(params)
  })
}
export function addFloor(data) {
  return request({
    url: '/operate/floor/addFloor',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}

export function appendFloor(data) {
  return request({
    url: '/operate/floor/addFloorData',
    headers: {
      'Content-Type': 'application/json;charset=UTF-8',
    },
    method: 'post',
    data
  })
}
